package com.kgc.personprovider.dao;

import com.kgc.personcommon.pojo.Role;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface RoleMapper {
    List<Role> getAll(Map<String, Object> params);
    int getCount(Map<String, Object> params);

    int addRole(Role role);
    int updateRole(Role role);
    int deleteRole(String id);
    Role getRoleById(String id);

    List<Role> getAllRoles(Map<String, Object> params);

    int addRoleDept(Map<String, Object> m);
    int delRoleDeptByRole(String rid);
    int addRolePerm(Map<String, Object> m);
    int delRolePermByRole(String rid);

    List<Map<String, String>> getRoutesByRoles(List<String> roles);

}
